{% from 'macros.html' import static_file %}
<!doctype html>
<html>
<head>
    {% block head %}
        {% block metas %}
            <meta charset="utf-8">
        {% endblock %}
        <title>
            {% block title %}八上历政社大文科问卷调查{% endblock %}
        </title>
        {% block styles %}
            {{ static_file('css', "https://cdn.staticfile.org/twitter-bootstrap/4.5.2/css/bootstrap.min.css", local=False) }}
            {{ static_file('icon', 'favicon/favicon.svg')}}
            {{ static_file('css', 'css/main.css')}}
        {% endblock %}
    {% endblock head %}
</head>
<body>
    {% block flashed_messages %}
        {% for message in get_flashed_messages(with_categories=True) %}
            {% if message[0] != 'message' and message[0] %}
                {% set category = message[0] %}
            {% else %}
                {% set category = 'info' %}
            {% endif %}
            {% set message_content = message[1] %}
            <div class="alert alert-{{ category }}" class="close">
                <button type="button" class="close" data-dismiss="alert">&times;
                </button>
                {{ message_content }}
            </div>
        {% endfor %}
    {% endblock flashed_messages %}
    <div class="container">
    {% block content %}
    {% endblock content %}
    </div>
    {% block scripts %}
        {{ static_file('js', "https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js", local=False) }}
        {{ static_file('js', "https://cdn.staticfile.org/popper.js/2.4.4/cjs/popper.min.js", local=False) }}
        {{ static_file('js', "https://cdn.staticfile.org/twitter-bootstrap/4.5.2/js/bootstrap.min.js", local=False) }}
    {% endblock %}
</body>
</html>